package com.usian.common;

import lombok.Getter;

@Getter //已包含get方法   //不用set方法 因为this.code = resultCode
public class CommonException extends RuntimeException{
    private static final long serialVersionUID = 1L;
    private ResultCode code = ResultCode.SERVER_ERROR;
    public CommonException(){}
    public CommonException(ResultCode resultCode) {
        super(resultCode.message());
        this.code = resultCode; //需用this，因为code不是静态的
    }
}
